package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QHistoryTelMapper;
import com.ruoyi.system.domain.QHistoryTel;
import com.ruoyi.system.service.IQHistoryTelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class QHistoryTelServiceImpl implements IQHistoryTelService 
{
    @Autowired
    private QHistoryTelMapper qHistoryTelMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param serviceId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public QHistoryTel selectQHistoryTelByServiceId(String serviceId)
    {
        return qHistoryTelMapper.selectQHistoryTelByServiceId(serviceId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param qHistoryTel 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    @DataSource(value = DataSourceType.SLAVE)
    public List<QHistoryTel> selectQHistoryTelList(QHistoryTel qHistoryTel)
    {
        return qHistoryTelMapper.selectQHistoryTelList(qHistoryTel);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param qHistoryTel 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertQHistoryTel(QHistoryTel qHistoryTel)
    {
        return qHistoryTelMapper.insertQHistoryTel(qHistoryTel);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param qHistoryTel 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateQHistoryTel(QHistoryTel qHistoryTel)
    {
        return qHistoryTelMapper.updateQHistoryTel(qHistoryTel);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param serviceIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteQHistoryTelByServiceIds(String serviceIds)
    {
        return qHistoryTelMapper.deleteQHistoryTelByServiceIds(Convert.toStrArray(serviceIds));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param serviceId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteQHistoryTelByServiceId(String serviceId)
    {
        return qHistoryTelMapper.deleteQHistoryTelByServiceId(serviceId);
    }
}
